﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QLKHO.Class;

namespace QLKHO.Forms
{
    public partial class frmDonVi : Form
    {
        public frmDonVi()
        {
            InitializeComponent();
            dONVITableAdapter.Fill(qLKHODataSet.DONVI);
            clsMain.flexConn.InitForms(this.Tag.ToString(), this, qLKHODataSet.DONVI);
            clsMain.flexConn.InitForms(this.Tag.ToString(),ref fcButton1);
            clsMain.flexConn.InitForms(this.Tag.ToString(),ref dataGridView1);
            clsMain.flexConn.KhoiTaoXMLTable(this.Tag.ToString(), qLKHODataSet.DONVI);
        }
        private void frmDonVi_Load(object sender, EventArgs e)
        {
            
            
            
        }

        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            clsMain.flexConn.AddDataToControls(this.Tag.ToString(), e.RowIndex,qLKHODataSet.DONVI);
            
        }

        private void fcButton1_Click(object sender, EventArgs e)
        {
            clsMain.flexConn.ButtonsClick(this.Tag.ToString(), fcButton1.intState);
            dONVITableAdapter.Update(qLKHODataSet.DONVI);
            
        }

        

        
    }
}
